package g327app4springcloud

class ServiceSideController {

    def index(String name, String format) {
        println "Called serivceSide/index with params>>$params and body>>${format == 'json' ? request.JSON : request.inputStream.text}"

        def result = MyDomainObject.findByName((name ?: request.JSON.name) ?: 'world')

        respond result, formats: [format ?: "html"]
    }
}
